This invention relates to automated home control systems and to formatting, authentication, and error detection in message between distributed components of a home control system that use existing electrical wiring for communications.
A modern home potentially has a great number of sophisticated electrical systems, including security systems, audio/video systems, telephone systems, intercom systems, etc. All of these systems require interconnecting wiring. A security system for example, requires wiring between sensors, controllers, and alarm devices. Audio/video systems require a maze of wiring between different active components, as well as wiring to as many as six speakers in a single room. Telephone and intercom systems similarly require wires between stations.
When systems such as these are installed during construction of a new home, wiring can be installed with little trouble. When adding systems to an existing house, however, installation of required wiring often requires significant effort.
Because of the difficulty of installing interconnecting wiring in an existing home, there are many available products that utilize existing AC power distribution wires or lines in a house for communications of various types. Products such as these work by modulating a signal on the power lines at a frequency that is well above the conventional 60 Hz frequency of electrical power carried by the distribution lines.
The so-called xe2x80x9cX10xe2x80x9d protocol is popular for providing simple communications between common electrical components such as security components, switchable power receptacles, dimmers, and other power control modules. The X10 system provides basic functionality between command modules and receivers of various types. In general, however, this system is limited to on/off and dimming capabilities.
A variety of other products are also available. Some home intercoms, for example, modulate an analog audio signal on the power lines to provide audio communications between two different rooms in a house, without requiring dedicated wiring. Extension telephones are available that utilize existing power lines rather than requiring the installation of telephone cable. Adapters are also available for transmitting video and stereo audio over existing power lines in a house.
There are a number of different protocols used for communications over existing building wiring. The relatively simple X10 communications protocol is one example. An X10 signal is composed of a series of 5 volt, 121 KHz pulses having a duration of 1 millisecond, positioned at zero crossings of the 60 Hz AC power signal. Each pulse corresponds to a binary 1, and the absence of a pulse corresponds to a binary 0. A single X10 command or message consists of a 22 bit word obtained from eleven complete cycles of the AC power signal.
All X10 receivers plugged into the household power lines will see all transmitted signals. However, each command carries the address of its intended receiver. A receiver responds to only those commands that have the address of the receiver. Thus, control modules such as switch modules can be paired with receiver modules by manually setting both addresses to the same value. Up to 256 addresses are available. Computer interfaces are available for allowing a computer to issue commands to different X10 receivers over home power lines.
The X10 system is just one example. A variety of different electrical schemes are used for communicating binary data in other systems. At a higher level, various data protocols are used to route messages and commands to intended receivers and to allow error detection and/or correction.
Most existing data protocols used in home controls systems are similar to network protocols, and therefore utilize packets or discrete data messages that include both source and destination addresses. Within a given system, all packets or messages are of a given length and format. In the X10 system, for example, each message is 22 bits in length, and 8 of these bits are used for addressing.
Some of these protocols provide for error detection, and some possibly provide for authentication.
A significant weakness of existing home control protocols is that they force all participating components to use the same data format and to understand the same commands or command codes. In the X10 system described above, the command structure is very simple, and is sufficient for on/off control and dimming of household electrical components and appliances. However, the command structure is probably not appropriate for more sophisticated control tasks such as, for example, programming a VCR from another wired component. For more sophisticated control jobs, more sophisticated command structures have been devised. However, they add unnecessary complexity when simple jobs need to be performed.
Similarly, all components are required to use identical data exchange protocols. For example, some protocols require a specific sequence of commands and acknowledgements, even though acknowledgements are not necessary in every situation.
Another weakness of existing home control protocols is that they either provide no message authentication or do so in a way that adds significant overhead to control procedures. Many authentication techniques utilize either a shared encryption key or a private/public key pair. In prior art systems, this requires exchanging the keys in a way that prevents other components from xe2x80x9ceavesdroppingxe2x80x9d and thereby learning the keys. This can become quite complicated, and consumes notable bandwidth when changing key values.
The invention described below includes a home control message format that is efficient and effective. A significant advantage of the format is that different sets of household components can define their own command structures. Simple devices (such as light switches, receptacles, etc.) can use command structures that are relatively simple. More sophisticated components (such as audio components, video components, computers, etc.) can use command structures that are relatively more complicated.
Another advantage of the invention is that message authentication can be performed without significant communications overhead. Although the invention utilizes an authentication scheme based on a shared key value that changes with time, key values themselves (which are potentially very large) are not transmitted between components.
The invention includes groups of sending and receiving components that communicate using household electrical wiring. Often, such a group is a pair of components, one of which is a controlling component such as a switch module, and another of which is a controlled component such as a switchable power receptacle.
The components of an individual group communicate by sending and receiving discrete messages between themselves. Each group of components is assigned a unique group identifier code, and messages between components of a group each include the group identifier code of that group. Although individual components receive messages from other groups, they are configured to disregard such messages that have group identifier codes that are different than that of the group to which the component belongs. Thus, although all components share the same transmission medium, virtual connections are formed between individual components based on their group identifier codes. The codes require fewer bits to encode than traditional source/destination addresses such as used in the prior art.
Messages are authenticated using a message authentication code that is calculated for and included in each message. The message authentication code for a message within a particular group is derived from message data and from a key value that is shared between the components of the group. A one-way hash function is used to calculate the key value.
The shared key value changes, at the discretion of one or more components of the group. Rather than transmitting a new key value when a change is desired, each component has information that enables it to independently calculate a common sequence of key values. When a key change occurs, each component of the group starts using the next key value in the sequence.
More specifically, key values are calculated using a one-way hash function, based on a common and unchanging seed value, and a counter that is incremented by one for each sequential key value. Thus, a new key value is calculated by incrementing the counter and then applying the hash function to the seed value and the counter value.
Another feature of the invention is that key changes are made arbitrarily by one component, without explicitly notifying other components. Rather, another component, upon receiving a message that does not authenticate with the current key value, tries the subsequent key value. If that value works, it is adopted as the current key value for future communications. Otherwise, the message is ignored, and the current key value is left unchanged.